//package com.example.usage.aop.transaction;
//
//import com.example.usage.aop.transaction.anno.TXConfig;
//import com.example.usage.aop.transaction.anno.UserService;
//import org.junit.Test;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.annotation.AnnotationConfigApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;
//
///**
// * 1.注解开发
// *  tx:annotation-driven
// * 2.xml开发
// *  tx:advice
// * 3.完全注解式开发
// * @EnableTransactionManagement
// */
//public class UserTest {
//
//    private ApplicationContext context = new AnnotationConfigApplicationContext(TXConfig.class);  // 完全注解开发
////    private ApplicationContext context = new ClassPathXmlApplicationContext("bean_trans.xml");
//    private UserService userService = context.getBean("userServiceAnno", UserService.class);
//
//    @Test
//    public void queryUsers(){
//        userService.getUsers().forEach(user -> {
//            System.out.println(user);
//        });
//    }
//
//    @Test
//    public void test(){
//        userService.transMoney();
//    }
//}
